/*
**  Whoopsfeed 爱购网
**  作者：杨o00o子
**  地址：http://whoopsfeed.com
**  本文件不开放，禁止任何复制、引用、演绎行为
**  所有代码在上线前理应使用YC压缩
**  贡献者(加入顺序)：YangZi、XX
*/

//新手帮助提示
var NoviceHelpTemp = template(
	'<div id="help" real_id="<%=real_id%>">'+
		'<a href="javascript:;" class="helpclose" title="关闭新手帮助">×</a>'+
		'<div id="step1" class="step" step="1" style="position:relative;left:50%;top:50%;margin-left:-160px;margin-top:-60px;width:380px;height:100px">'+
			'<p style="text-align:center">'+
				'<span class="h2">欢迎来到WhoopsFeed.com</span>'+
				'<br>下面我会简单介绍下如何使用，以便你快速上手<br>'+
				'<a href="javascript:;" class="next">下一步</a>'+
			'</p>'+
		'</div>'+
		'<div id="step2" class="step" step="2" style="top:90px;left:140px;width:250px">'+
			'<b class="jt jt_left" style="left:-40px;top:20px"></b>'+
			'<p>'+
				'<span class="h1">①</span><span class="h2">桌面</span>'+
				'<br>可以在应用中心添加自己需要的应用到桌面<br>'+
				'<a href="javascript:;" class="next">下一步</a>'+
			'</p>'+
		'</div>'+
		'<div id="step3" class="step" step="3" style="top:90px;left:550px;width:250px">'+
			'<b class="jt jt_top" style="top:-40px;left:30px"></b>'+
			'<p>'+
				'<span class="h1">②</span><span class="h2">应用码头</span>'+
				'<br>可以将桌面图标拖放到这<br>'+
				'<a href="javascript:;" class="next">下一步</a>'+
			'</p>'+
		'</div>'+
		'<div id="step4" class="step" step="4" style="top:130px;left:550px;width:250px">'+
			'<b class="jt jt_top" style="top:-40px;left:30px"></b>'+
			'<p>'+
				'<span class="h1">③</span><span class="h2">翻页导航</span>'+
				'<br>可以快速切换当前桌面<br>'+
				'<a href="javascript:;" class="next">下一步</a>'+
			'</p>'+
		'</div>'+
		'<div id="step5" class="step" step="5" style="bottom:50px;left:550px;width:250px">'+
			'<b class="jt jt_bottom" style="bottom:-40px;left:30px"></b>'+
			'<p>'+
				'<span class="h1">④</span><span class="h2">任务栏</span>'+
				'<br>这个就不用我介绍了吧 =)<br>'+
				'<a href="javascript:;" class="over">&nbsp;完&nbsp;成&nbsp;</a>'+
			'</p>'+
		'</div>'+
	'</div>'
);

//登录/注册弹出层
var LoginRegisteDialogTemp = template(
    '<div id="_dialog_login_register"class="dialog" style="display: block;">' +
        '<div style="width: 600px; margin-left: -300px; top: 99.5px;" class="fillet">' +
            '<div class="corner">' +
                '<span class="tl"></span><span class="tr"></span><span class="br"></span><span class="bl"></span></div>' +
            '<div class="panel">' +
                '<div class="boxGuide">' +
                    '<div class="title">' +
                        '<h3>收藏喜欢，分享乐趣</h3>' +
                        '<p>爱库网是基于兴趣的资源分享社区，可以方便地收藏、整理以及跟好朋友分享您喜爱的互联网资源。</p></div>' +
                    '<div class="regGuide">' +
                        '<div class="tab">' +
                            '<ul class="white">' +

                                '<li <% if(type == "#_login"){ %>class="first active"<% }else{ %>class="first"<% } %>><span>登录</span></li>' +
                                '<li <% if(type == "#_registe"){ %>class="last active"<% }else{ %>class="last"<% } %>><span>注册账号</span></li>' +
                            '</ul>' +
                        '</div>' +
                        '<div class="box">' +
                            '<form <% if(type == "#_login"){ %>style="display:block"<% }else{ %>style="display:none"<% } %> action="/login" method="post">' +
                                '<dl class="formset"><input type="hidden" name="returnUrl" value="/">' +
                                    '<dt>用户名或邮箱:</dt>' +
                                    '<dd><input type="text" name="username" value=""></dd>' +
                                    '<dt>密码:</dt>' +
                                    '<dd><input type="password" name="password" value=""></dd>' +
                                    '<dd class="button"><input type="submit" value="登录" class="main"></dd>' +
                                '</dl>' +
                            '</form>' +
                            '<form action="/register" method="post" <% if(type == "#_registe"){ %>style="display:block"<% }else{ %>style="display:none"<% } %>>' +
                                '<input type="hidden" name="code" value="bb"><input type="hidden" name="callback" value="/">' +
                                '<dl class="formset">' +
                                    '<dt>用户名:</dt>' +
                                    '<dd><input type="text" name="username" maxlength="15" value=""></dd>' +
                                    '<dt>邮箱:</dt>' +
                                    '<dd><input type="text" name="email" value=""></dd>' +
                                    '<dt>密码:</dt>' +
                                    '<dd><input type="password" name="password" value=""></dd>' +
                                    '<dd class="button"><input type="submit" value="注册" class="main"></dd>' +
                                '</dl>' +
                            '</form>' +
                            '<div class="appGuide">' +
                                '<h3>用合作账号登录:</h3>' +
                                '<p>' +
                                    '<a class="sina" href="/account/loginapp?app=sina&amp;returnUrl=/">新浪微博账号</a>' +
                                    '<a class="qq" href="/account/loginapp?app=qq&amp;returnUrl=/">腾讯微博账号</a>' +
                                    '<a class="sohu" href="/account/loginapp?app=sohu&amp;returnUrl=/">搜狐微博账号</a>' +
                                    '<a class="douban" href="/account/loginapp?app=douban&amp;returnUrl=/">豆瓣账号</a>' +
                                '</p>' +
                            '</div>' +
                        '</div>' +
                        '<div class="split">OR</div>' +
                    '</div>' +
                '</div>' +
            '</div>' +
            '<em ekey="close" class="close"></em></div>' +
        '<iframe frameborder="0" src="javascript:void(0);" allowtransparency="true" class="mask_iframe"></iframe>' +
        '<div class="mask"></div>' +
    '</div>'
);

//添加宝贝弹出层
var AddBaobeiByUrlDialogTemp = template(
    '<div id="_dialog_add_baobei" class="dialog">' +
        '<div style="width: 650px; margin-left: -325px; top: 161px;" class="fillet">' +
            '<div class="corner">' +
                '<span class="tl"></span><span class="tr"></span><span class="br"></span><span class="bl"></span></div>' +
            '<div class="panel">' +
                '<div class="newkeep">' +
                    '<div class="tab">' +
                        '<ul>' +
                            '<li class="active" ><span class="icon-link">1.填写URL</span></li>' +
                            '<li class=""><span class="icon-import">2.收藏宝贝</span></li>' +
                            '<li class=""><span class="icon-upload">3.分享宝贝</span></li>' +
                        '</ul>' +
                    '</div>' +
                    '<div id="_get_add_share_baobao">'+
                        '<div class="tabContent contents" style="display: block;">' +
                            '<div class="tabPanel">' +
                                '<dl class="formset linkForm">' +
                                    '<dd class="meta" id="_http_status"></dd>' +
                                    '<dd class="meta">* 只需3步即可完成宝贝收藏与分享，快来试一试吧！</dd>' +
                                    '<dt>输入URL(宝贝地址)：</dt>' +
                                    '<dd>' +
                                        '<input type="text" class="ipt" value="http://item.taobao.com/item.htm?spm=a2106.m893.1000384.d139.3OFGHL&id=17766271413&scm=1029.newlist-0.bts3.50031712&ppath=" name="url">' +
                                        '<span class="button_big_main"><span>' +
                                        '<button type="submit" id="_get_baobei_info">添加</button>' +
                                        '</span></span>' +
                                    '</dd>' +
                                    '<dd class="meta">* 智能识别宝贝链接（暂只支持 淘宝，天猫 网址）<br>* 系统会自动保存宝贝信息，且宝贝主要信息不得被修改<br>* 系统会自动推荐标签，也可以手动修改保存标签信息</dd>' +
                                '</dl>' +
                            '</div>' +
                        '</div>' +//contents 为多加样式，用于js
                        '<div class="tabForm contents" style="display:none ;">' +
                            '<div class="thumb"><img src="./i/base/typeimage.160.gif" width="160px" height="128px"></div>' +
                            '<div class="thumb-list">' +
                                '<ul>' +
                                    '<li><img src="./i/base/typeimage.160.gif" class="selected" width="45px" height="45px"></li>' +
                                    '<li><img src="http://img02.taobaocdn.com/bao/uploaded/i2/37188055/T2KQOgXdNcXXXXXXXX_!!37188055.jpg_210x210.jpg" class="selected" width="45px" height="45px"></li>' +
                                    '<li><img src="http://img02.taobaocdn.com/bao/uploaded/i2/37188055/T2KQOgXdNcXXXXXXXX_!!37188055.jpg_310x310.jpg" class="selected" width="45px" height="45px"></li>' +
                                    '<li><img src="http://img.ikeepu.com/img/20/17/75/634807537072363555.jpg_100" class="selected" width="45px" height="45px"></li>' +
                                    '<li><img src="http://img.ikeepu.com/img/20/14/37/634682694774062500.jpg_100" class="selected" width="45px" height="45px"></li>' +
                                '</ul>' +
                            '</div>' +
                            '<div class="back"><a ekey="back" href="javascript:;">&lt;&lt;返回</a></div>' +
                            '<div>' +
                                '<div class="keepWrap">' +
                                    '<input type="hidden" value="0" name="sid">' +
                                    '<input type="hidden" value="http://img.ikeepu.com/img/20/18/46/634839179531791712.jpg_500" name="url">' +
                                    '<input type="hidden" value="image" name="type">' +
                                    '<input type="hidden" value="http://img.ikeepu.com/img/20/18/46/634839179531791712.jpg_500" name="referer">' +
                                    '<input type="hidden" value="" name="thumb">' +
                                    '<h3>宝贝信息</h3>' +
                                    '<div class="item">' +
                                        '<label>标题：</label>' +
                                        '<div class="input">' +
                                        '<input type="text" value="634839179531791712.jpg_500" name="title">' +
                                        '</div>' +
                                    '</div>' +
                                    '<div class="item">' +
                                        '<label>专辑：</label>' +
                                        '<div class="select selectCategory">' +
                                            '<span>请选择专辑</span>' +
                                            '<input type="hidden" value="" name="category">' +
                                            '<em></em>' +
                                        '</div>' +
                                    '</div>' +
                                    '<div class="item">' +
                                        '<label>标签：</label>' +
                                        '<div class="input inputTag">' +
                                            '<input type="text" name="tag" hint="请用逗号或空格分割" class="hint_blank">' +
                                        '</div>' +
                                    '</div>' +
                                    '<div class="item">' +
                                        '<label>描述：</label>' +
                                        '<div class="textarea">' +
                                            '<textarea name="description"></textarea>' +
                                        '</div>' +
                                    '</div>' +
                                    '<div class="button">' +
                                        '<div class="checkbox">' +
                                            '<label>' +
                                                '<input type="checkbox" value="true" name="like">加入喜欢' +
                                            '</label>' +
                                            '</div>' +
                                        '<div class="checkbox"><a target="_blank" href="/setting/sync">设置同步?</a></div>' +
                                        '<button type="submit" class="main" id="_add_baobei_info">提交</button>' +
                                    '</div>' +
                                '</div>' +
                            '</div>' +
                        '</div>' +
                        '<div class="tabContent contents" style="display:none">' +
                            '<div class="tabPanel">' +
                                '<div class="items">' +
                                    '<a href="https://chrome.google.com/webstore/detail/cfchejhoffjbajclionfhafcgikfmcnp">' +
                                        '<span class="icons icon-chrome">你觉得这个宝贝不错吧！<em>赶快分享到Sina微博吧！</em></span>' +
                                    '</a>' +
                                    '<a href="http://static.ikeepu.com/download/ikeepu.1.6.xpi">' +
                                        '<span class="icons icon-firefox">你觉得这个宝贝不错吧！<em>赶快分享到Tencent微博吧！</em></span>' +
                                    '</a>' +
                                    '<a href="http://static.ikeepu.com/download/ikeepu.1.5.safariextz">' +
                                        '<span class="icons icon-safari">你觉得这个宝贝不错吧！<em>赶快分享到RenRen微博吧！</em></span>' +
                                    '</a>' +
                                    '<a href="/app/20">' +
                                        '<span class="icons icon-ie">你觉得这个宝贝不错吧！<em>赶快分享到Taobao网吧！</em></em></span>' +
                                    '</a>' +
                                '</div>' +
                            '</div>' +
                        '</div>' +
                    '</div>'+
                '</div>' +
            '</div>' +
            '<em ekey="close" class="close"></em></div>' +
        '<iframe frameborder="0" src="javascript:void(0)" allowtransparency="true" class="mask_iframe"></iframe>' +
        '<div class="mask"></div>' +
    '</div>'
);

//select 选择框
var AllSelectTemp = template(
    '<div id="_como">' +
        '<div class="como_menu category_selector" style="display: ; position: absolute; left: 577.5px; top: 492px;">' +
            '<div class="como_menuitem  ">' +
                '<div class="como_menuitem_label">' +
                    '<div class="como_menuitem_checkbox">' +
                    '</div>' +
                    '<font color="#336699">新建专辑</font>' +
                '</div>' +
            '</div>' +
        '</div>'+
    '</div>'
);